#ifndef __ALBUM_PICTURE_H__
#define __ALBUM_PICTURE_H__

#include "sqlite3.h"
#include "common_info.h"

#include <ctime>
#include <vector>
#include <string>


// typedef struct {
//     std::string file_path;
//     std::time_t modification_time;
//     std::string file_size;
// } PictureInfo;


class AlbumPicture {
public:
    AlbumPicture();
    ~AlbumPicture();

    int createPictureInfoTable(sqlite3* db);
    int insertPictureInfo(const PictureInfo& picture_info);
    std::vector<PictureInfo> queryPictureInfoByTime();
    std::vector<PictureInfo> queryAllPictureInfo();
    std::vector<PictureInfo> queryPictureInfoByFilepath(const std::string& file_path);
    bool updatePictureInfo(const std::string& file_path, const std::string& new_filename);
    bool deletePictureInfo(const std::string& file_path);
    void printPictureInfo(const PictureInfo& picture_info);
    int getCount();
    std::vector<PictureInfo> queryPictureInfoByTime(int page_index, int page_size);
    bool deletePicture(const std::string& file_path);
    bool renamePicture(const std::string& file_path, const std::string& new_filename);
    bool updatePicture(const std::string& file_path);
};



#endif